<template>
    <div class="home-box">
        <div class="home-left_menu">
            <img class="logo" src="@/assets/picc_logo.png" alt="">
        </div>
        <div class="home-right-menu">
            <top />
            <div class="home-content">
                <nav-left />
                <contentRight />
            </div>
        </div>
    </div>
</template>

<script>
// import { mapState } from 'vuex'
import top from './components/top.vue'
import navLeft from './navLeft.vue'
import contentRight from './contentRight.vue'
import { getWorkStatus } from '@/api/user'
// import communication from "@/console/communication";

const userInfo = JSON.parse(sessionStorage.getItem("userInfo")) || {};
export default {
    components: { top, navLeft, contentRight },
    created() {
        this.getWorkStatus();
    },
    methods: {
        getWorkStatus() {
            const params = {
                groupId: userInfo.group,
                userId: userInfo.userId
            }
            getWorkStatus(params).then(res => {
                this.workStatusDec = res.msg;
                if (res.msg === '工作') {
                    this.$store.commit("work/SET_WORKSTATUS", '0');
                } else {
                    this.$store.commit("work/SET_WORKSTATUS", '1');
                }
            })
        },
    }
}
</script>

<style lang="scss">
.home-box {
    height: 100vh;
    display: flex;

}

.home-left_menu {
    width: 80px;
    height: 100%;
    background: #F1F3F5;

    .logo {
        margin-top: 50px;
        margin-left: 10px;
        width: 60px;
        height: 28px;
    }
}

.home-right-menu {
    width: calc(100% - 80px);
    background: #fff;
    overflow: hidden;
}

.home-content {
    display: flex;
    height: calc(100% - 60px);
}
</style>